package com.bfly.mall.order.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bfly.core.base.entity.BaseEntity;
import com.bfly.core.config.ResourceConfigure;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单购物车列表DTO
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/4/17 22:03
 */
public class OrderCartListDTO implements Serializable {

    private static final long serialVersionUID = 2014865995152118664L;

    private int productId;
    private String sn;
    private int buyCount;
    private BigDecimal price;
    private String name;
    private String speTitle;
    @JSONField(serialize = false)
    private String cover;

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getUrl() {
        return StringUtils.isNotBlank(getCover()) ? ResourceConfigure.getResourceHttpUrl(getCover()) : "";
    }
    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public int getBuyCount() {
        return buyCount;
    }

    public void setBuyCount(int buyCount) {
        this.buyCount = buyCount;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSpeTitle() {
        return speTitle;
    }

    public void setSpeTitle(String speTitle) {
        this.speTitle = speTitle;
    }
}
